package QC.MessageBox.beans.dto;

import io.vertx.core.json.JsonObject;

/**
 * Created by Andaren on 2017/6/5.
 * Used for: 用户自定义菜单轨迹
 */
public class UserActionDTO {

    private String openId;

    private Long actionTime;

    private String headUrl;

    private String nickname;

    private String developerId;

    private String pubname;


    private String actionUrl;

    private String description;

    public String getOpenId() {
        return openId;
    }

    public UserActionDTO setOpenId(String openId) {
        this.openId = openId;
        return this;
    }

    public Long getActionTime() {
        return actionTime;
    }

    public UserActionDTO setActionTime(Long actionTime) {
        this.actionTime = actionTime;
        return this;
    }

    public String getHeadUrl() {
        return headUrl;
    }

    public UserActionDTO setHeadUrl(String headUrl) {
        this.headUrl = headUrl;
        return this;
    }

    public String getNickname() {
        return nickname;
    }

    public UserActionDTO setNickname(String nickname) {
        this.nickname = nickname;
        return this;
    }

    public String getDeveloperId() {
        return developerId;
    }

    public UserActionDTO setDeveloperId(String developerId) {
        this.developerId = developerId;
        return this;
    }

    public String getPubname() {
        return pubname;
    }

    public UserActionDTO setPubname(String pubname) {
        this.pubname = pubname;
        return this;
    }

    public String getActionUrl() {
        return actionUrl;
    }

    public UserActionDTO setActionUrl(String actionUrl) {
        this.actionUrl = actionUrl;
        return this;
    }

    public String getDescription() {
        return description;
    }

    public UserActionDTO setDescription(String description) {
        this.description = description;
        return this;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("UserActionDTO{");
        sb.append("openId='").append(openId).append('\'');
        sb.append(", actionTime=").append(actionTime);
        sb.append(", headUrl='").append(headUrl).append('\'');
        sb.append(", nickname='").append(nickname).append('\'');
        sb.append(", developerId='").append(developerId).append('\'');
        sb.append(", pubname='").append(pubname).append('\'');
        sb.append(", actionUrl='").append(actionUrl).append('\'');
        sb.append(", description='").append(description).append('\'');
        sb.append('}');
        return sb.toString();
    }

    public JsonObject toJson() {
        return new JsonObject()
                .put("openid", openId)
                .put("actiontime", actionTime)
                .put("headurl", headUrl)
                .put("nickname", nickname)
                .put("developerid", developerId)
                .put("actionurl", actionUrl)
                .put("description", description)
                .put("pubname", pubname);
    }
}
